<template>
  <div class="categonies">
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>商品管理</el-breadcrumb-item>
      <el-breadcrumb-item>商品分类</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
      {{ msg }}
    </el-card>
  </div>
</template>
<script>
export default {
  data() {
    return {
      msg: '商品分类'
    }
  },
  methods: {
    getList() {
      this.$http
        .get('categories', {
          params: {
            type: 1,
            pagenum: 1,
            pagesize: 10
          }
        })
        .then(res => {
          console.log(res.data) //
        })
        .catch(function(error) {
          // 请求失败处理
          console.log(error)
        })
    }
  },
  mounted() {
    this.getList()
  }
}
</script>
